5.3 AT^SPIC Display PIN counterThe AT^SPIC command can be used to find out whether the ME is waiting for a password and, if so, how many attempts are left to enter the password.
The execute command returns the number of attempts still available for entering the currently required password, for example the PIN, PUK, PH-SIM PUK etc.
The read command AT^SPIC? indicates which password the number of attempts stated by the execute command actually refers to. Also, the write command may be used to query the counter for a specific password: It indicates the number of attempts still available for entering the password identified by <facility>, for example the PIN, PIN2, PH-SIM PIN etc.
To check whether or not you need to enter a password use the read commands AT+CPIN?, AT+CPIN2? and AT^SPIC?. If the response to AT+CPIN? is "READY" the counter of the execute command AT^SPIC relates to PIN2. See last example. If the responses to AT+CPIN? and AT+CPIN2? both read "READY", no password is currently required, and the referrer of the execute command AT^SPIC is explicitly undefined.
<counter>(num)
<facility>(str)SIM PIN or SIM PUK. If the SIM PIN has been deactivated after three failed attempts, the counter for SIM PUK will be returned instead."Phone code" or "device code" (cf. AT+CLCK and AT+CPWD). If incorrectly entered three times, the Master Phone Code is required to lift the lock and the number of remaining attempts for the master phonecode will be returned.SIM PIN2 or SIM PUK2. If the SIM PIN2 has been deactivated after three failed attempts, the counter for SIM PUK2 will be returned instead.
<code>(text)ME is waiting for PIN2, when the attempt to access PIN2 requiring features was acknowledged with +CME ERROR:17 (e.g. if the user attempts to edit the FD phonebook).ME is waiting for PUK2 to unblock a disabled PIN2. Necessary if preceding command was acknowledged with +CME ERROR:18.ME is waiting for phone-to-SIM card password if ''PS'' lock is active and user inserts other SIM card than the one used for the lock. (''PS'' lock is also referred to as phone or antitheft lock).ME is waiting for Master Phone Code, if the above ''PS'' lock password was incorrectly entered three times.
• Whenever the required password changes, <counter> changes to reflect that change. Please refer to the examples below.
• For passwords associated to the phone lock (''PS'' lock set by user or factory) or other factory set locks, such as ''PF'', ''PN'', ''PU'', ''PP'', ''PC'' the number of attempts is subject to a timing algorithm explained in AT+CPIN. If these passwords are incorrectly entered the counter first returns 3, 2 and 1 remaining attempt(s), but then gives the total number of attempts which amounts to 63 (see example below).
•
EXAMPLE 1
EXAMPLE 2
EXAMPLE 3
This example shows that after successful SIM PIN1 authentication the counter of the AT^SPIC execute and read command refers to SIM PIN2, i.e. it does not reflect the status of SIM PIN1. This may be a problem if the user enters a wrong PIN1 and is not aware that the number of attempts left to enter SIM PIN1 is counted down.
As SIM PIN1 authentication was successful, the counter relates to SIM PIN2 and correctly indicates that the user has 3 attempts to enter SIM PIN2. Likewise, the read command notifies that the ME is waiting for SIM PIN2. SIM PIN1 authentication is still valid, and the counter relates to SIM PIN2. SIM PIN1 authentication is still valid, and the counter relates to SIM PIN2. This time, after the SIM PIN1 code has been disabled, the counter indicates the status of SIM PIN1 and notifies that 10 attempts are left to enter the SIM PUK.To avoid conflicts we recommend to use the AT^SPIC read and write commands rather than the execute command only. The read command clearly states the currently required password, and the write command may be used to get the counter for a specific <facility>, in this case for example "P2".
|